<%@ include file="../common.jsp" %>


<tr align="left">
	<td class="spacingColumnWidthLess"></td>
	<td colspan="3" align="right">
		<div class="ui-corner-all" style="width: 80%; border-style: dotted; border-width:1px; height: 3.5em; padding: 10px; text-align: left;">
			<span class="formLabel">Expired Document&nbsp;&nbsp;</span>
			<a target="_blank" href="downloadAttachment/${renewalDetailsForm.docIdToRenew}.htm">${renewalDetailsForm.docName}</a>
			<br>
			<span class="formLabel" >Attach a File</span>
			<input type="file" name="docContent" />
			<c:choose>
				<c:when test="${renewalDetailsForm.docId>0}">
						<input type="hidden" value="updateDocument" name="_eventId">
						<br>
						<a target="_blank" href="downloadAttachment/${renewalDetailsForm.docId}.htm">${renewalDetailsForm.docName}</a>
				</c:when>
				<c:otherwise>
					<input type="hidden" value="uploadDocForRenewal" name="_eventId">
				</c:otherwise>
			</c:choose>
			
		</div>
	</td>
	<td class="spacingColumnWidthMedium"></td>
	<td colspan="3">
		<%-- <div class="ui-corner-all" style="width: 80%; border-style: dotted; border-width:1px; height: 3.5em; padding: 10px; overflow: auto;">
			<span class="formLabel">Link Documents&nbsp;
				<a href="#" onclick="javascript:showDocumentLookUpDialog('uploadNewDocForm');" style="text-decoration: none;">
					<img alt=""  src='<c:url value="/customTheme/Icons/BlueLotus_DMS_icons-30.png"></c:url>'>
				</a>
				<input class="formButton ui-corner-all" type="button" value="Remove" onclick="deleteDocument()"/>
			</span>
			<ul id="linkedDocId" class="userListClass">
			<c:forEach items="${linkedDocumentMap}" var="linkedDocumentMap">
				<li id="${linkedDocumentMap.key}" class="ui-state-default">${linkedDocumentMap.value}</li>
				<input type="hidden" name="linkedDocId" id="${linkedDocumentMap.key}" value="${linkedDocumentMap.key}">
			</c:forEach>
			</ul>  
				<c:forEach var="linkedDocumentList" items="${linkedDocumentList}">
    					<input type="hidden" name="oldLinkedDocument" value="${linkedDocumentList}"></input>
   				</c:forEach>
   				
		</div> --%>
		<c:forEach items="${linkedDocumentMap}" var="linkedDocumentMap">
				<input type="hidden" name="linkedDocId" id="${linkedDocumentMap.key}" value="${linkedDocumentMap.key}">
			</c:forEach>
				<c:forEach var="linkedDocumentList" items="${linkedDocumentList}">
    					<input type="hidden" name="oldLinkedDocument" value="${linkedDocumentList}"></input>
   				</c:forEach>
	</td>
	<td class="spacingColumnWidthLess"></td>
</tr>
<tr>
		<td class="spacingColumnWidthLess"></td>
		<td class="formError" colspan="3" align="center">
			<form:errors path="docContent" cssClass="errorMsg"></form:errors>
		</td>
		<td class="spacingColumnWidthMedium"></td>
		<td class="formLabel"></td>
		<td class="spacingColumnWidthLess"></td>
		<td class="formError">
			 
		</td>
		<td class="spacingColumnWidthLess"></td>
	</tr>


<%-- <%@ include file="../common.jsp" %>
	<tr>
		<td class="spacingColumnWidthLess"></td>
		<td class="formLabel"><label>Attachment</label> </td>
		<td class="spacingColumnWidthLess"></td>
		<td>
			<input type="file" name="docContent" class="file ui-widget-content ui-corner-all"/> 
		</td>
		<td class="spacingColumnWidthMedium"></td>
	</tr>
	<tr class="formSpacingRow formBlockColor"><td colspan="9"></td></tr>
	<tr>
		<td class="spacingColumnWidthLess"></td>
		<td class="formLabel"><label>Remarks</label> </td>
		<td class="spacingColumnWidthLess"></td>
		<td>
			<form:textarea path="remarks" id="remarks" cssClass="text ui-widget-content ui-corner-all"/>
		</td>
		<td class="spacingColumnWidthMedium"></td>
		<td>
			<input type="button" class="formButton" value="Upload And Save Document Details" onclick="loadContentToServer('renewDocForm','contentDiv')">
			<input type="hidden" value="renewDoc" name="_eventId">
			<input type="hidden" value="ajaxRequest" name="ajaxSource">	
		</td>	
	</tr>
	<tr>
			<td class="spacingColumnWidthLess"></td>
			<td class="formLabel"></td>
			<td class="spacingColumnWidthLess"></td>
			<td> <form:errors path="remarks" cssClass="errorMsg"></form:errors>
			</td>
	</tr> --%>